<template>
     <div class="title">Keep-Alive 嵌套路由</div>
    <div class="inner">
        <router-link to="/KeepAlive/image">图片</router-link>
        <router-link to="/KeepAlive/TextAlbum">文本</router-link>
    </div>
     <router-view v-slot="{Component}">
            <component :is="Component"></component>
    </router-view> 
    <router-view v-slot="{Component}">
        <keep-alive>
            <component :is="Component"></component>
        </keep-alive>
    </router-view> 
</template>

<script setup>
  
</script>

<style scoped>
a{
    padding: 10px;
}
</style>